package com.zjw.touchscreen.server.config;

import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @description: knife4j配置类
 * @authod:
 * @date:
 **/
@Configuration
public class OpenApiConfig {

    @Bean
    public OpenAPI springShopOpenAPI() {
        return new OpenAPI()
                // 接口文档标题
                .info(new Info()
                        .title("API接口文档")
                        .contact(
                                new Contact()
                                        .name("赵进伟")
                                        .email("1101162781@qq.com")
                                        .url("https://www.niumowang.club")
                        )
                        // 接口文档简介
                        .description("这是基于Knife4j OpenApi3的接口文档")
                        // 接口文档版本
                        .version("v1.0"))
                .externalDocs(new ExternalDocumentation()
                        .description("SpringBoot 3基础框架")
                        .url("http://127.0.0.1:8088"));
    }
}